package org.example.basic.day03;

import lombok.AllArgsConstructor;
import lombok.Data;

public class Demo02关键字final {
    public static void main(String[] args) {
        final Teacher teacher = new Teacher("2", "张三", 18);
        teacher.setName("李四");

    }
}

class Person {
    final int AGE = 20;

    public void show() {
        System.out.println("");
    }
}

class Student extends Person {
    @Override
    public void show() {
        System.out.println("年龄：" + AGE);
    }
}

@Data
@AllArgsConstructor
class Teacher {
    final String id;

    public Teacher() {
        this.id = "123";
    }

    private String name;
    private int age;

}
